package exception;

public class Rec implements Shape {

	private int len,wid;
	
	
	
	public Rec(int len, int wid){
		if(len <= 0 || wid <= 0){
			throw new NoValueException("出现非法值");
		}
		this.len = len;
		this.wid = wid;
	}



	@Override
	public void getArea() {
		System.out.println(len * wid);

	}

}
